package week_7.homework;

public class halloweenTest {
    public static void main(String[] args) {
        NewLinkedBinarySearchTree HalloweenTree = new NewLinkedBinarySearchTree();
        HalloweenTree.addElement(7);
        HalloweenTree.addElement(5);
        HalloweenTree.addElement(9);
        HalloweenTree.addElement(2);

        System.out.println(HalloweenTree.toString());
        System.out.println("添加元素1之后的二叉查找树为：");
        HalloweenTree.addElement2(1,HalloweenTree.getRoot());
        System.out.println(HalloweenTree.toString());
        System.out.println("树中最大的元素："+HalloweenTree.findMax());
        System.out.println("树中最小的元素："+HalloweenTree.findMin());
        HalloweenTree.removeMax();
        System.out.println("删除当前最大元素后树中最大的元素："+HalloweenTree.findMax());

    }
}
